package com.java.polymorphism.test_1;

/**
 * @author luzhikun
 * @date 2020/12/5- 20:51
 */
public class Kids extends ManKind {
    private int yearOld;

    public Kids() {

    }

    public Kids(int yearOld) {
        this.yearOld = yearOld;
    }

    public void setYearOld(int yearOld) {
        this.yearOld = yearOld;
    }

    public int getYearOld() {
        return yearOld;
    }

    public void printYearOld() {
        System.out.println("学生年龄为：" + yearOld);
    }

    public void employeed() {
        if (getSex() == '男') {
            System.out.println("我是一个男生");
        } else {
            System.out.println("我是一个女生");
        }
    }
}